package com.二叉树2;

import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;

public class 递归
{
    static class Solution{
        public List<Integer> girl(TreeNode treeNode){
            List<Integer> list = new ArrayList<>();
            if(treeNode==null){
                return list;
            }
            list.add(treeNode.val);
            girl(treeNode.left);

            return list;
        }
        public TreeNode addLeftTree(){
            TreeNode treeNode = new TreeNode(10);
            for(int i = 1 ;i<10;i++){
                treeNode.left = new TreeNode(10+i);
                treeNode = treeNode.left;
            }
            return treeNode;
        }

        public static void main(String[] args) {
            Solution  solution = new Solution();
            List<Integer> girl = solution.girl(new TreeNode(new int[]{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}));
        }


    }
}
